﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Steer
{
	public partial class WanderTest : UserControl
	{
		public WanderTest()
		{
			// Required to initialize variables
			InitializeComponent();

            Loaded += new RoutedEventHandler(WanderTest_Loaded);

            
		}

        void WanderTest_Loaded(object sender, RoutedEventArgs e)
        {
            myWander.position = new Vector2D(200, 200);

            CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);
        }

        void CompositionTarget_Rendering(object sender, EventArgs e)
        {
            myWander.wander();
            myWander.update();
        }
	}
}